#ifndef __GAME_OBJECT_H__
#define __GAME_OBJECT_H__

#include "cocos2d.h"
#include "CCObject.h"
#include "GameSprite.h"
#include "defines.h"

using namespace cocos2d;

class GameObject : public CCObject
{
private:
	GameSprite* m_pImage;			//auto release object	
public:
	BoxupType_e m_eObjectType;
	GameObject *m_pAttachGameObject;	
	GameObject *m_pParentGameObject;

	GameObject();		
	~GameObject();
	bool initObject(const char* filePath, CCLayer* parent, float x, float y, int row, int column, BoxupType_e eObjectType); 
	bool isTouch(CCPoint tap, CCTouch *touch);
	CCTouch* getTouch();
	void setPosition(float x, float y);
	void setTouch(CCTouch* touch);
	CCPoint getPosition();		
	virtual void release();
	
	CC_SYNTHESIZE(int, m_iColumn, Column);
	CC_SYNTHESIZE(int, m_iRow, Row);	
};

#endif 